from lib.sensors.ssd1306.oled import OLED
from lib.config.index import sensor_config
from utils import device

config = sensor_config.get_sensor("ssd1306")
scl = config["scl"]
sda = config["sda"]
width = config["width"]
height = config["height"]

_oled = OLED(scl, sda, width, height)

device.running_ticks_us("examples.ssd1306.circle.1")
def draw_circle(a,b,r):
    global _oled
    _oled.shape_renderer.circle(a,b,r)
    _oled.show()

draw_circle(50, 50, 10)
device.running_ticks_us("examples.ssd1306.circle.2")